package com.ruoyi.order.service.impl;

import java.util.Collections;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.OrderServiceMapper;
import com.ruoyi.order.domain.OrderService;
import com.ruoyi.order.service.IOrderServiceService;

/**
 * 订单服务Service业务层处理
 * 
 * @author yun
 * @date 2024-12-31
 */
@Service
public class OrderServiceServiceImpl implements IOrderServiceService 
{
    @Autowired
    private OrderServiceMapper orderServiceMapper;

    /**
     * 查询订单服务
     * 
     * @param id 订单服务主键
     * @return 订单服务
     */
    @Override
    public OrderService selectOrderServiceById(Long id)
    {
        return orderServiceMapper.selectOrderServiceById(id);
    }

    /**
     * 查询订单服务列表
     * 
     * @param orderService 订单服务
     * @return 订单服务
     */
    @Override
    public List<OrderService> selectOrderServiceList(OrderService orderService)
    {
        return orderServiceMapper.selectOrderServiceList(orderService);
    }

    /**
     * 新增订单服务
     * 
     * @param orderService 订单服务
     * @return 结果
     */
    @Override
    public int insertOrderService(OrderService orderService)
    {
        return orderServiceMapper.insertOrderService(orderService);
    }

    /**
     * 修改订单服务
     * 
     * @param orderService 订单服务
     * @return 结果
     */
    @Override
    public int updateOrderService(OrderService orderService)
    {
        return orderServiceMapper.updateOrderService(orderService);
    }

    /**
     * 批量删除订单服务
     * 
     * @param ids 需要删除的订单服务主键
     * @return 结果
     */
    @Override
    public int deleteOrderServiceByIds(Long[] ids)
    {
        return orderServiceMapper.deleteOrderServiceByIds(ids);
    }

    /**
     * 删除订单服务信息
     * 
     * @param id 订单服务主键
     * @return 结果
     */
    @Override
    public int deleteOrderServiceById(Long id)
    {
        return orderServiceMapper.deleteOrderServiceById(id);
    }

    @Override
    public List<Long> selectOrderServiceByOrderId(Long orderId) {
        return orderServiceMapper.selectIdsByOrderId(orderId);
    }
}
